from rest_framework import serializers
from Admins.models import *
class UserSerializer(serializers.ModelSerializer):
    # 用户模型的序列化器
    class Meta:
        model = Administrators
        # 需要返回的用户信息，便于前端粗略展示
        fields = ['id', 'username', 'email', 'password', 'avatar']

